package com.isoft.service.tableservice;

import com.isoft.dao.tabledao.DfmeCfceDao;
import com.isoft.entity.tableentity.dfme_cfce.DfmeCfceMsg;
import com.isoft.utils.TimeFormatUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.sql.Timestamp;

@Slf4j
@Service
public class DfmeCfceService {
    @Autowired
    DfmeCfceDao dfmeCfceDao;
    public int insertmsg(DfmeCfceMsg dfmeCfceMsg) {
        Timestamp create_time = TimeFormatUtils.GetNowTime();
        dfmeCfceDao.insertMeta(create_time,dfmeCfceMsg.getDfmeCfceMeta());
        return dfmeCfceDao.insertDflt(dfmeCfceMsg.getDfmeCfceMeta().getSeqn(),create_time,dfmeCfceMsg.getDfmeCfceDflt());
    }
}
